<template>
	<view>
		<view class="" @click="sendMessageToChild">
			发送
		</view>
		<iframe id="myFrame" src="http://chat.shyf.cc/#/chat/1002" frameborder="0" scrolling='no' width="500" height="500"></iframe>
	</view>
</template>

<script>
	export default {
		data() {
			return { 'a': '' }
		},
		methods: {
			sendMessageToChild() {
				var iframe = document.getElementById('myFrame')
				iframe.contentWindow.postMessage({ 'key': '9527', 'msg': '你好，怎么理解城邦四美德' }, '*')
			}
		},
	}
</script>

<style>
</style>